/*
 * PostFilterMixerPanel.java
 *
 * Created on 3 juni 2008, 23:13
 */

package com.laamella.syntherface.synths.alesis.micron.gui;

import com.laamella.syntherface.synths.models.ParameterModel;

/**
 *
 * @author  danny
 */
@SuppressWarnings("serial") public class PostFilterMixerPanel extends javax.swing.JPanel {

    /** Creates new form PostFilterMixerPanel */
    public PostFilterMixerPanel() {
        initComponents();
    }
	
	public void setModel(ParameterModel level, ParameterModel pan){
		levelSlider.setModel(level);
		if(pan==null){
			panPanel.setVisible(false);
		}else{
			panSlider.setModel(pan);
		}
	}

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jLabel1 = new javax.swing.JLabel();
        levelSlider = new javax.swing.JSlider();
        panPanel = new javax.swing.JPanel();
        jLabel2 = new javax.swing.JLabel();
        panSlider = new javax.swing.JSlider();
        jLabel4 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();

        setBackground(new java.awt.Color(204, 204, 255));
        setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0), 3));
        setLayout(null);

        jLabel1.setText("level");
        add(jLabel1);
        jLabel1.setBounds(10, 10, 22, 14);

        levelSlider.setOrientation(javax.swing.JSlider.VERTICAL);
        levelSlider.setOpaque(false);
        add(levelSlider);
        levelSlider.setBounds(10, 20, 24, 80);

        panPanel.setOpaque(false);
        panPanel.setLayout(null);

        jLabel2.setText("pan");
        panPanel.add(jLabel2);
        jLabel2.setBounds(0, 0, 20, 14);

        panSlider.setOrientation(javax.swing.JSlider.VERTICAL);
        panSlider.setOpaque(false);
        panPanel.add(panSlider);
        panSlider.setBounds(0, 10, 24, 80);

        jLabel4.setFont(new java.awt.Font("Tahoma", 1, 12));
        jLabel4.setForeground(java.awt.Color.blue);
        jLabel4.setText("L");
        panPanel.add(jLabel4);
        jLabel4.setBounds(30, 10, 10, 15);

        jLabel3.setFont(new java.awt.Font("Tahoma", 1, 12));
        jLabel3.setForeground(java.awt.Color.red);
        jLabel3.setText("R");
        panPanel.add(jLabel3);
        jLabel3.setBounds(30, 70, 10, 15);

        add(panPanel);
        panPanel.setBounds(40, 10, 40, 90);
    }// </editor-fold>//GEN-END:initComponents


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JSlider levelSlider;
    private javax.swing.JPanel panPanel;
    private javax.swing.JSlider panSlider;
    // End of variables declaration//GEN-END:variables

}
